package com.mkyong.client;
 
import java.net.URL;
import java.util.Calendar;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

import com.mkyong.ws.DataHora;
 
public class DataHoraClient{
 
	public static void main(String[] args) throws Exception {
 
		URL url = new URL("http://localhost:8888/ws/dataHora?wsdl");
        
        //1st argument service URI, refer to wsdl document above
		//2nd argument is service name, refer to wsdl document above
        QName qname = new QName("http://ws.mkyong.com/", "DataHoraImplService");
 
        Service service = Service.create(url, qname);
 
        DataHora n = service.getPort(DataHora.class);
 
        System.out.println(n.getDataHora());
    }
 
}